The present invention relates generally to computer memory management, and more particularly to a method and apparatus for DMA-generated memory write-back.
With each new generation of computer hardware and each new generation of computer software, more and more data needs to be processed in less and less time. This is particularly true of image data and graphics systems, in which the continuing increases in data size and data rates place additional burdens on graphics memory management systems. Attempts to improve graphics system performance to meet these needs are running up against the limitations of memory systems in general, and of memory device limitations in particular.
In graphics applications, it is often desirable or necessary to read data (or a stream of data) from a source, to transfer the data to a destination, and to clear blocks of the source memory after the read operation has completed. The source memory blocks are often cleared (e.g., written with a background data pattern) in anticipation of future operations. This two-step sequential process of reading followed by source clearing/writing is inefficient.
Similar memory operation limitations restrict and retard improvements in the performance of contemporary printers. Printers have become very popular in recent times due to their greatly improved ability to print clear images. Generally, printers are available as monochrome only printers, such as printers that print only in gray and black, or color printers that print in color as well as monochrome. These printers operate by converting an image on a host device such as a personal computer into data that is received in the printer by a printer circuitry board that stores the data in the printer. The printer circuitry board generates coded data representing the image, which is then transmitted by the printer circuitry board to a print engine that drives the mechanisms of the printer to convert the data back into an image that is printed on a print medium, such as paper. Similar procedures can be followed for generating images for other purposes, such as displaying on devices like computer monitors or cell phones.
In many printer products and applications, some of the image information is modified or “corrected” by a computer microprocessor. This processing of the image information can improve the overall quality of the printed image from the printer. For example, the processing can be used to calibrate the image information to adjust for particular printer characteristics, so that the final printed image faithfully reproduces the original image. The processing can also be used to enhance the printed image to improve it over the original image, for example, by the removal of “red eye” in a photograph.
To accomplish these printing objectives, a great deal of information must be stored in the printer memory. In addition to image information, the stored information also includes printer instructions for controlling and directing the processing of the printer image data, and program routines for controlling and directing the printing operation of the printer.
Many modern electronic devices have multiple processors. This is certainly true of printers, which may, for example, have a central processing unit (“CPU”) that has overall responsibility for controlling all of the printer operations, and additional processors with specialized duties and functions, such as video controllers, image processors, print engine drivers, and so forth.
In advanced printers, for any given printing operation or print job, the CPU will typically store a set of instructions in the memory to control the processing that is to be done by the other processors. As long as those instructions are stored in memory, the processors that are reading those instructions continue to read the instructions, until the instructions are cleared out of the memory. Sometimes this is desired, such as when the same process needs to be repeated several times. At other times the instructions need to be executed only once. Either way, those instructions need to be cleared from the memory after the instructions have been used, so that the instructions do not continue to be read and repeated over and over.
In other implementations, the CPU will typically initialize a new buffer before operating on the buffer. When implementing a printer language such as Postscript or PCL6, the CPU will add images to a buffer. For example, the letter ‘A’ needs to be placed at a specified location. The routine that places the ‘A’ does not know what data is in and around this location, so it uses read-modify writes to update the data in the buffer and not disturb the surrounding image information. This requires that each buffer be initialized to a known value prior to processing the printer language commands.
To clear this memory, it has been necessary for the CPU to clear each memory location individually. For example, the CPU would generate or copy a set of new memory values. The CPU would then either write that set directly into the memory or transfer the set to a memory management device, such as a direct memory access controller (“DMA”), to transfer the set into the memory in order to clear the memory of the now-obsolete instructions.
However, having the CPU go out and clear each memory location independently ties up a lot of the computational capacity of the printing system. That is, this type of memory clearing process compromises much of the bandwidth, speed, and ability of the main CPU, thereby delaying or preventing it from performing other, more important tasks that it needs to perform. Thus, the whole printing system is slowed and does not perform as needed.
One solution is to use a more expensive, more powerful CPU. However, the historical trend in the industry has been the opposite, namely, to reduce costs and simplify systems while finding alternate ways to increase performance.
Thus, a need still remains for faster, more efficient, more effective, and less expensive methods and mechanisms for optimizing memory management. There is a particular need for improvements for use in devices that look to specific areas of memory for instructions, such as in systems used for image processing.
In view of the continuing increases in performance, capabilities, and customer expectations, accompanied by ever-increasing competition and declining prices, it is ever more and more critical that answers be found to these problems.
Solutions to these problems have been long sought but prior developments have not taught or suggested any solutions and, thus, solutions to these problems have long eluded those skilled in the art.